package com.hehui.partimejob.items.body;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

public class UserBean {
    /**
     * username
     */ /**
     * username : admin1323323
     * password : 123456
     * phone : 18481834524
     * email : 1611993222@qq.com
     */

    private String username;
    /**
     * password
     */
    private String password;
    /**
     * phone
     */
    private String phone;
    /**
     * email
     */
    private String email;

    public static UserBean objectFromData(String str) {

        return new Gson().fromJson(str, UserBean.class);
    }

    public static List<UserBean> arrayUserBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<UserBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }


}
